package org.gwtEss.other;

import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasChangeHandlers;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.CheckBox;

public class ChkBox extends CheckBox implements HasChangeHandlers{
	
	  public HandlerRegistration addChangeHandler(final ChangeHandler handler) {
		  ClickHandler clickHandler = new ClickHandler(){

				public void onClick(ClickEvent event) {
					handler.onChange(null);
				}
				
			}; 
		  return addDomHandler(clickHandler, ClickEvent.getType());
//	    return addDomHandler(handler, ChangeEvent.getType());
	  }
	
}